class ChatInfo {
  String chatName = "";
  String lastMessage = "";
  String headUrl = "";

  ChatInfo(this.chatName, this.lastMessage, this.headUrl);
  ChatInfo.fromJson(Map<String, dynamic> json)
      : chatName = json['ChatName'],
        lastMessage = json['LastMessage'],
        headUrl = json['HeadUrl'];

  Map<String, dynamic> toJson() => {
    'ChatName':chatName,
    'LastMessage':lastMessage,
    'HeadUrl':headUrl,
  };

  @override
  String toString() {
    // TODO: implement toString
    return "$chatName $lastMessage $headUrl";
  }
}
